<?php


/**
 * Skeleton subclass for performing query and update operations on the 'seo_users' table.
 *
 * 
 *
 * You should add additional methods to this class to meet the
 * application requirements.  This class will only be generated as
 * long as it does not already exist in the output directory.
 *
 * @package    lib.model
 */
class SeoUserPeer extends BaseSeoUserPeer {


	/**
	 * Retrieve a users associated with site
	 *
	 * @param      int $siteId the site id.
	 * @param      PropelPDO $con the connection to use
	 * @return     array<SeoUser>
	 */
	public static function retrieveBySiteId($siteId, PropelPDO $con = null)
	{
		$criteria = new Criteria();
		$criteria->add(SeoSiteUserPeer::SITE_ID, $siteId);

		$siteUsers = SeoSiteUserPeer::doSelect($criteria, $con);
		
		$userIds = array();
		foreach($siteUsers as $siteUser)
			$userIds[] = $siteUser->getUserId();

		$criteria = new Criteria();
		$criteria->add(SeoUserPeer::ID, $userIds, Criteria::IN);
			
		return SeoUserPeer::doSelect($criteria, $con);
	}
	
} // SeoUserPeer
